
curl -X POST https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions \
-H "Authorization: Bearer $DASHSCOPE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "model": "qwen3-32b",
   "messages": [
    {
        "role": "system",
        "content": "You are a assistant with ability to use tool with function call and summary result for question.\n"
    },
    {
        "role": "user",
        "content": "\u5217\u51fa\u5f53\u524d\u6570\u636e\u5e93\u6240\u6709\u7528\u6237\u53ef\u4ee5\u64cd\u4f5c\u7684\u6a21\u5f0f(Schema)?"
    }
  ],
  "tools": [
    {
        "function": {
        "name": "list_extensions",
        "description": "List available and installed extensions",
        "parameters": {
            "properties": {},
            "type": "object"
        }
        },
        "type": "function"
    },
    {
        "function": {
        "name": "list_schemas",
        "description": "List all schemas in the database",
        "parameters": {
            "properties": {},
            "type": "object"
        }
        },
        "type": "function"
    },
    {
        "function": {
        "name": "list_objects",
        "description": "List objects in a schema",
        "parameters": {
            "properties": {
            "schema_name": {
                "description": "Schema name",
                "title": "Schema Name",
                "type": "string"
            },
            "object_type": {
                "default": "table",
                "description": "Object type: 'table', 'view', 'sequence', or 'extension'",
                "title": "Object Type",
                "type": "string"
            }
            },
            "required": [
            "schema_name"
            ],
            "type": "object"
        }
        },
        "type": "function"
    },
    {
        "function": {
        "name": "get_object_details",
        "description": "Show detailed information about a database object",
        "parameters": {
            "properties": {
            "schema_name": {
                "description": "Schema name",
                "title": "Schema Name",
                "type": "string"
            },
            "object_name": {
                "description": "Object name",
                "title": "Object Name",
                "type": "string"
            },
            "object_type": {
                "default": "table",
                "description": "Object type: 'table', 'view', 'sequence', or 'extension'",
                "title": "Object Type",
                "type": "string"
            }
            },
            "required": [
            "schema_name",
            "object_name"
            ],
            "type": "object"
        }
        },
        "type": "function"
    }
  ],
  "enable_thinking": true,
  "stream": true 
}' 


# Only stream has reasoning content, need to remove enable_thinking=True
# 
